package com.dkha.server.common.config;


public class TimeTransform {

    public TimeTransform() {
    }

    public String trans(){
        //获得系统的时间，单位为毫秒,转换为秒
        long totalMillTimes=System.currentTimeMillis();
        long totalSeconds=totalMillTimes/1000;

        //求当前时间的秒
        long totalSecond=totalSeconds%60;

        //求当前时间的分
        long totalMinutes=totalSeconds/60;
        long totalMinute=totalMinutes%60;

        //求当前时间的时
        long totalHours=totalSeconds/3600;
        long totalHour=totalHours%24;

        String time = totalHour+":"+totalMinutes+":"+totalMinute;
        return time;
    }
}
